import request from '@/utils/request'

// 查询章节/学习资料列表
export function listChapter_material(query) {
  return request({
    url: '/teach/chapter_material/list',
    method: 'get',
    params: query
  })
}

// 查询章节/学习资料详细
export function getChapter_material(id) {
  return request({
    url: '/teach/chapter_material/' + id,
    method: 'get'
  })
}

// 新增章节/学习资料
export function addChapter_material(data) {
  return request({
    url: '/teach/chapter_material',
    method: 'post',
    data: data
  })
}

// 修改章节/学习资料
export function updateChapter_material(data) {
  return request({
    url: '/teach/chapter_material',
    method: 'put',
    data: data
  })
}

// 删除章节/学习资料
export function delChapter_material(id) {
  return request({
    url: '/teach/chapter_material/' + id,
    method: 'delete'
  })
}
